home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 447 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  2. Message-ID: <4gidr8$86n@mulga.cs.mu.OZ.AU>
  3. X-Original-Date: 22 Feb 1996 18:49:12 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 22 Feb 96 20:21:07 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: Explicit? What's that?
  9. Organization: Comp Sci, University of Melbourne
  10. References: <4gg7df$76c@charnel.ecst.csuchico.edu> <4gg8p5$lcq@engnews1.Eng.Sun.COM>
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMSzQP+EDnX0m9pzZAQEJ9QGAhFIwhP9WA4t5w0etQA4Xj0OQbtOno9ru
  13.     eMxCMafzTx17hEDkZTOrHBiwGdH5Qv88
  14.     =LrrS
  15.  
  16. clamage@Eng.Sun.COM (Steve Clamage) writes:
  17.  
  18. >The only advantage I can see for an "explicit" conversion operator is
  19. >that a name for a complicated type, especially one involving pointers
  20. >or references, might be inconvenient and not intuitive. In that
  21. >case you might prefer to be able to cast to char**& instead of thinking
  22. >up a name for that type.
  23.  
  24. `explicit' conversion operations might be useful in templates.
  25. They would make it easy for a template to work both with data types
  26. that have an explicit conversion operator and also with data types
  27. which just use an implicit conversion operator.
  28.  
  29. --
  30. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  31. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  32. ---
  33. [ To submit articles: try just posting with your news-reader.
  34.                       If that fails, use mailto:std-c++@ncar.ucar.edu
  35.   FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  36.   Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  37.   Comments? mailto:std-c++-request@ncar.ucar.edu.
  38. ]
  39.